package dobest.ray.com.jiongjiong.activity.action.selftest;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import dobest.ray.com.jiongjiong.R;
import dobest.ray.com.jiongjiong.activity.BaseActivity;
import dobest.ray.com.jiongjiong.views.NavigationBar;

/**
 * Created by Ray on 2016/3/24.
 * https://github.com/ray0807
 */
public class ChangeScreenBrightActivity extends BaseActivity implements View.OnClickListener {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_change_screen_bright);
        findViews();
        init();
        addListeners();
    }

    @Override
    public void findViews() {
        navi = (NavigationBar) findViewById(R.id.navi);
        navi.setBackListener(R.mipmap.img_back, "");
        navi.setTitle("近视测试说明");
        navi.setTextRight("确定", this);
        navi.setTextRightColor(getResources().getColor(R.color.white));

    }

    @Override
    public void init() {
//        navi.postDelayed(new Runnable() {
//            @Override
//            public void run() {
//
//                // 3秒后把屏幕调至最亮
//                Settings.System.putInt(getContentResolver(),
//                        Settings.System.SCREEN_BRIGHTNESS, 255);
//            }
//        }, 3000);

    }

    @Override
    public void addListeners() {

    }

    @Override
    public void onClick(View v) {
        Intent it = null;
        switch (v.getId()) {
            case R.id.ll_text_right:
                it = new Intent(this, VisionSelfTestChooseActivity.class);
                break;
        }
        if (it != null) {
            startActivity(it);
            finish();
        }
    }
}
